<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>登录</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
<SCRIPT type=text/javascript src="<%=basePath%>js/jquery-1.7.1.min.js"></SCRIPT>
<script type="text/javascript">
/*
$(function(){
	$("#loginbutton").bind("click",function(){
		$("#loginform").submit();
	});
});*/
$(function(){
	$('#loginId,#passwd,#valid').keydown(function(e){
		if(e.keyCode==13){
			$("#loginbutton").click(); 
		}
		});
	$("#loginbutton").bind("click",function(){
		if($("#loginId").val()=="" || $("#passwd").val()=="" || $("#valid").val()==""){
			alert("请认真输入完整信息！");
		}else{
			$("#loginform").submit();
		}
	});
	$("#resetbutton").bind("click",function(){
		$("#loginform").reset();
	});
});
</script>


  </head>
  
  <body>
  	<div><font color="red"><s:actionerror/></font>
    <form id="loginform" action="admin/login!login.action" method="post">
    	<div>帐号：<input type="text" name="master.name" id ="loginId" size="24" maxlength="50"/></div><br />
		<div>密码：<input type="password" name="master.password" id="passwd" size="25"  maxlength="20"/></div><br />
		<div>验证：<input type="text" name="valid" id="valid" size="4" maxlength="4"/><img id="validImg" border=0 src="<%=basePath %>/jcaptcha" width="90" height="20" /><a style="text-decoration:underline;cursor:pointer;" onclick="reloadValid();">换一个</a></div><br />
		<div><input id="loginbutton" type="button" value="登录"></div>
    </form>
    </div>
  </body>
</html>
